<?


if($vis == "gruppe")
{
	echo "<p><b class='rubrik'>Alle grupper under ".$overskrift_left."</b></p>";

	$alle_under = $this->sorterings_model->array_sort($alle_under, 'navn');
	$count = 0;
	foreach($alle_under as $r)
	{
		$under = new entitet();
		$under->find_type_kvant($r['id']);
		$type_kvant = $under->type_kvant;

		if($type_kvant == $vis)
		{
			$count = $count + 1;
			echo "<p style='float:left; width:340px; background:none' ' class='ink'>";
			echo anchor("core/vis/se/".$type."/".$r['id'], "- ".$r['navn'], "class='ink'");
			echo "</p><br>";
		}
	}

	echo "<p><i class='rubrik'>(ialt ".$count.")</i></p>";
}
else
{
	echo "<p><b class='rubrik'>Alle individer under ".$overskrift_left."</b></p>";
	echo "<div id='individer_alle' class='ink'>";
	$alle_under = $this->sorterings_model->array_sort($alle_under, 'navn');
	$count = 0;
	echo "<p class='ink'>";
	foreach($alle_under as $r)
	{
		
		$under = new entitet();
		$under->find_type_kvant($r['id']);
		$type_kvant = $under->type_kvant;

		if($type_kvant == $vis)
		{
			$count = $count + 1;
			echo "</p>";
			echo "<p id='individ_alle' class='ink'>";
			echo anchor("core/vis/se/individ/".$r['id'], $r['navn'] , "class='ink' id='".$r['id']."'" );
			echo anchor("core/vis/se/gruppe/".$stamdata['id']."/rediger_titel_i_gruppe/".$r['id'] , " " , " id='individ_alle_".$r['id']."' class='rubrik'");
		}
		
	}

	echo "</p>";
	echo "<p><i class='rubrik'>(ialt ".$count.")</i></p>";
	echo "</div>";

}
?>
<script>

$("#individ_alle").live({
	mouseenter:	
	  function () {
		$('#tilfoej_alle').remove();
		var id = $("a", this).attr("id");
		$('#individ_alle_' + id).append("<span style='float:right' id='tilfoej_alle'> rediger titler</span>");
	  },
	mouseleave:
	  function (){
		
	  }
	}
);

$("#individer_alle").live({
	mouseenter:	
	  function () {

	  },
	mouseleave:
	  function (){
		$('#tilfoej_alle').remove();
	  }
	}
);

</script>
